package controller;

import org.springframework.web.bind.annotation.*;
import vo.AjaxResult;

/**
 * Author：汤小洋
 * Date：2023-07-06 11:16
 * Description：<描述>
 */
@RestController
@RequestMapping("/path")
public class PathController {

    // @RequestMapping("/path1")
    // @RequestMapping(value = "/path1")
    // @RequestMapping(path = "/path1")
    @RequestMapping(path = {"/path1","/p1"})
    public AjaxResult path1(){
        System.out.println("PathController.path1.....");
        return AjaxResult.success();
    }

    // @RequestMapping(value = "/path2/{id}/{name}", method = RequestMethod.GET)
    @GetMapping("/path2/{id}/{name}")
    public AjaxResult path2(@PathVariable int id,@PathVariable String name){
        System.out.println(id+","+name);
        System.out.println(5/0);
        return AjaxResult.success();
    }

}
